Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 세션 사진 수 증가 #47

Merged
merged 22 commits into from
Jul 9, 2024

Conversation

gikhoon
Copy link
Member

@gikhoon gikhoon commented Jul 3, 2024

연관된 이슈

이슈링크(url): #22

✅ 작업 내용

  • 세션 사진 테이블 추가
  • 세션 목록 반환 API 수정
  • 세션 추가 API 수정
  • 세션 사진 삭제 API 구현
  • 세션 사진 추가, 순서 바꾸는 API 구현

🗣 ️리뷰 요구 사항

DDL 수정사항

  • create session_photo
CREATE TABLE session_photo (
    session_photo_id BIGINT AUTO_INCREMENT PRIMARY KEY,
    folder_name VARCHAR(255) NULL,
    file_name VARCHAR(255) NULL,
    url VARCHAR(255) NULL,
    session_photo_order INT NULL,
    session_id BIGINT NULL,
    created_at DATETIME(6) NULL,
    modified_at DATETIME(6) NULL,
    CONSTRAINT FK_session FOREIGN KEY (session_id) REFERENCES session (session_id)
);
  • 데이터 이동
INSERT INTO session_photo (folder_name, file_name, url, session_photo_order, session_id, created_at, modified_at)
SELECT folder_name, file_name, url, 0,session_id,created_at, modified_at
FROM session
WHERE url IS NOT NULL;
  • session의 url, folder_name, file_name 항목을 삭제해야 한다.
ALTER TABLE session
DROP COLUMN url,
DROP COLUMN file_name,
DROP COLUMN folder_name;

Copy link
Member

@Youthhing Youthhing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경 사항이 많아서 리뷰가 좀 길었네요. 읽고 의견 남겨주시면 감사하겠습니다!

@Youthhing
Copy link
Member

추가로 리뷰 요구 사항에 적힌 DDL도 별도로 PR란에 적으면 좋을 듯 합니다!

@Youthhing
Copy link
Member

@gikhoon 테이블 변경에 따른 수정해야할 DDL 해당 PR에 정리 부탁드립니다!

@gikhoon gikhoon merged commit ff35c50 into develop Jul 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants